**************************************************************
* ELECTRICITY SPILOVERS 
*  CODE BY: GABRIEL LADE & KATRINA JESSOE
**************************************************************
clear all
capture log close
set more off

*SELECT OUTPUT DATE
global outputdate = "20200605"		 

*SELECT USER
global user 1
global user  "DIRECTORY"
if $user == 1 cd $user

*File designations
global code "codeSTATA\Spillovers"
global figs "figSTATA"
global tables "tabSTATA"
global data_main "dataSTATA\"
global rass "dataSTATA\CEC_RASS"
global survey "dataSTATA\Burbank_Survey"


***************************************************************************
*SPILLOVERS
***************************************************************************

*************************************
*DATA PREP, SUMMARY STATS, AND SUMMARY FIGURES
*************************************
frame rename default data_main 
use $data_main\BurbankData_20170131.dta, clear //Raw meter data
do $code\1a_dataprep
do $code\1b_ss_graphs

********************************
*MAIN REGRESSIONS
********************************
do $code\2a_main_regs
do $code\2b_simulation

********************************
*SIMULATIONS AND ROBUSTNESS CHECKS
********************************
do $code\3b_robustness
do $code\3b_survey_analysis

